home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / menus / envmnu11.zip / README.BAT < prev   
DOS Batch File  |  1992-11-16  |  5KB  |  167 lines

  1. @echo off
  2.  
  3. cls
  4. echo  
  5. echo  README.BAT uses EnviMenu.exe as an example of how to use EnviMenu.  These
  6. echo  batch files use quite a few environment variables, and so if you have trouble
  7. echo  running it then you should increase your environment size:
  8. echo      COMMAND.COM /E:XXXX   where XXXX is environment size
  9. echo  
  10. echo  There are two hidden options on this ReadMe.bat menu.  Type "SECRET" or "HID"
  11. echo  to find these options.
  12. echo  
  13. pause
  14.  
  15. set MENU_OPTION=Help
  16.  
  17. :MenuRepeat
  18. envimenu MENU_OPTION README.BAT /PRE :~ /COM :! /SORT /Prompt "Whaddya want? (Quit to leave)" /Hid @@@
  19. if errorlevel 1 GOTO ~Quit
  20. GOTO ~%MENU_OPTION%
  21.  
  22. REM *********************************************************************
  23. REM ** THE FOLLOWING LINES ARE THE OPTIONS THAT WILL BE MADE AVAILABLE **
  24. REM ** ON THE MENU.                                                    **
  25. REM *********************************************************************
  26.  
  27. :~Spawn DOS Shell
  28. :!Load command.com until you type exit
  29. command.com
  30. GOTO MenuRepeat
  31.  
  32. REM Screen Lines is an example of a menu within a menu
  33. :~Screen Lines
  34. :!Set screen to 25, 43, or 50 lines
  35. :#25
  36. :#43
  37. :#50
  38. set LINE_COUNT=
  39. envimenu LINE_COUNT README.BAT /PRE :# /Prompt "How many screen lines?" /Esc
  40. if a%LINE_COUNT%z==az GOTO MenuRepeat
  41. mode 80,%LINE_COUNT%
  42. set LINE_COUNT=
  43. GOTO MenuRepeat
  44.  
  45. :~Date & Time
  46. :!Set computer's data and time
  47. cls
  48. date
  49. time
  50. GOTO MenuRepeat
  51.  
  52. :~Check Disk Integrity
  53. :!Run ChkDsk on current drive
  54. cls
  55. chkdsk
  56. pause
  57. GOTO MenuRepeat
  58.  
  59. REM   THE FOLLOWING EIDT LINES HAVE ALT-255 INSTEAD OF SPACE SO THAT
  60. REM   THEY HAVE DISTINCT LABELS
  61. :~Edit AutoExec
  62. :!Edit the file: C:\AUTOEXEC.BAT
  63. edit C:\AUTOEXEC.BAT
  64. GOTO MenuRepeat
  65. :~Edit Config
  66. :!Edit the file: C:\CONFIG.SYS
  67. edit C:\CONFIG.SYS
  68. GOTO MenuRepeat
  69.  
  70. :~View My Home Menu
  71. :!View (but not really execute) the MAIN menu my family uses at home
  72. call HomeMenu.bat
  73. GOTO MenuRepeat
  74.  
  75. :~Help
  76. :!View help screen from executing "ENVIMENU.EXE /?"
  77. cls
  78. ENVIMENU.EXE /? | more
  79. pause
  80. GOTO MenuRepeat
  81.  
  82. REM The following item is a hidden option for this menu
  83. :~@@@Secret
  84. cls
  85. echo  
  86. echo  Congratulations!  You found the secret menu option and all you got was this
  87. echo  lousy message.
  88. echo  
  89. pause
  90. GOTO MenuRepeat
  91.  
  92. :~@@@Hid
  93. cls
  94. echo  
  95. echo          So you entered HID.  Big deal!  Who told you to do this?
  96. echo  
  97. pause
  98. GOTO MenuRepeat
  99.  
  100. :~AttrMenu
  101. :!Example BATCH file AttrMenu.bat, which selectively changes file attributes
  102. cls
  103. CALL AttrMenu
  104. echo  
  105. echo   About to remove archive attribute on chosen files in this directory.
  106. echo  
  107. echo   From the command line, this would be: "AttrMenu * -a" or "AttrMenu -a"
  108. echo  
  109. pause
  110. CALL AttrMenu -a
  111. cls
  112. echo  
  113. echo   About to set archive attribute on chosen files in this directory.
  114. echo  
  115. echo   From the command line, this would be: "AttrMenu * +a" or "AttrMenu +a"
  116. echo  
  117. pause
  118. CALL AttrMenu +a
  119. GOTO MenuRepeat
  120.  
  121. :~CDMenu
  122. :!Example BATCH file CDMenu.bat, which selectively changes directory along tree
  123. cls
  124. echo  
  125. echo  CDMENU will only work after you change directories if EnviMenu.exe is
  126. echo  somewhere in your path.  If you do change directories, then after this
  127. echo  demo of CDMenu you will want to return to the current directory to
  128. echo  Continue ReadMe.bat.
  129. echo  
  130. pause
  131. call cdmenu.bat
  132. if exist ReadMe.bat GOTO MenuRepeat
  133. GOTO End
  134.  
  135. :~Quit
  136. :!Return to the DOS shell
  137. set MENU_OPTION=
  138. cls
  139. echo EnviMenu   Copyright Nombas 1992
  140. echo  
  141. echo  EnviMenu is but a tiny part of the upcoming CEnvi shareware product.
  142. echo  CEnvi is designed to appease envious C programmers, or those who are
  143. echo  envious of C programmers, in the batch environment.  CEnvi will allow
  144. echo  C-like language extensions to batch files without modifying command.com
  145. echo  or using extra memory.
  146. echo  
  147. echo  I am making this small piece of CEnvi available only to answer a
  148. echo  InterNet question about "Which Menuing System do YOU use?".  If EnviMenu
  149. echo  helps you then go ahead and use it for free.  If you send $5 for EnviMenu,
  150. echo  then you will be registered as an EnviMenu user.  Registered users
  151. echo  will receive updates on the future of CEnvi and will be eligible to
  152. echo  receive CEnvi, when available, for $5 off the shareware price (expected
  153. echo  to be $10 to $25, with tons of example files and utilities created using
  154. echo  CEnvi).  Registered users will also get EnviAsk.exe which allows formatted
  155. echo  input of environment variables.  Together with EnviMenu, EnviAsk just about
  156. echo  eliminates the need for the computer illiterate to ever see the DOS prompt.
  157. echo  
  158. echo  Nombas (otherwise known as Brent Noorda) can be reached at:
  159. echo    mail: Brent Noorda / Nombas / 36 Tainter St. / Medford, MA 02155 USA
  160. echo           phone: (617)391-5289     email: bsn@world.std.com
  161. echo  
  162. pause
  163. goto End
  164.  
  165. :End
  166.  
  167.